<include file="public:header" />
<div class="toptip link_g">
  <h2>提示：</h2>
  <p>
你可以通过全选来设置所有页面的链接方式和缓存时间<br />
        职位列表页，人才列表页，会员中心页面均不能开启缓存
    <br />系统内内置页面无法删除！
    <br />强烈建议开启页面缓存，缓存让系统性能显著提高！<br />
骑士人才系统支持多种URL样式，无论您是<strong>asp , aspx , jsp ，shtml , ......</strong>程序都可以完美转换为骑士系统，且URL可以保持不变，具体请咨询<a href="http://www.74cms.com" target="_blank">骑士客服</a>
</p>
</div>
  <notempty name="apply['Subsite']">
  <div class="seltpye_x">
      <div class="left">所属分站</div>
      <qscms:subsite 列表名="subsite_list"/>
      <div class="right">
        <if condition="$visitor['role_id'] eq 1">
          <volist name="subsite_list" id="subsite">
            <a href="{:P(array('subsite_id'=>$subsite['s_id']))}" <if condition="$Think.get.subsite_id eq $subsite['s_id'] or ($Think.get.subsite_id eq 0 and $subsite['s_id'] eq 0)">class="select"</if>>{$subsite.s_sitename}</a>
          </volist>
        <else/>
          <volist name="subsite_list" id="subsite">
            <if condition="in_array($subsite['s_id'],$visitor['subsite'])">
              <a href="{:P(array('subsite_id'=>$subsite['s_id']))}" <if condition="$Think.get.subsite_id eq $subsite['s_id']">class="select"</if>>{$subsite.s_sitename}</a>
            </if>
          </volist>
        </if>
        <div class="clear"></div>
      </div>
      <div class="clear"></div>
  </div>
  </notempty>
  <form action="{:U('set_url')}" method="post"  name="form1" id="form1">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="link_lan"   id="list">
     <tr>
      <td   class="admin_list_tit admin_list_first">
      <label id="chkAll"><input type="checkbox" name="chkAll"  id="chk" title="全选/反选" />页面名称</label>
    </td>
      <td class="admin_list_tit"> 调用名 </td>
      <td   align="center" class="admin_list_tit">类型</td>
      <td   align="center"  class="admin_list_tit">链接</td>
      <td   align="center"   class="admin_list_tit">缓存</td>
      <td width="130" align="center"  class="admin_list_tit" >编辑</td>
    </tr>
   <volist name="list" id="vo">
  <tr>
      <td class="admin_list admin_list_first">  
    <input type="checkbox" name="id[]" value="{$vo['id']}"/>   
   {$vo['pname']}
    </td>
      <td class="admin_list"> 
    {$vo['alias']}    </td>
      <td   align="center" class="admin_list">
      <if condition="$vo['systemclass'] eq 1">
    <span style="color: #FF6600">系统内置</span>
    <else />
    自定义页面
    </if>
    </td>
      <td   align="center"  class="admin_list">
     <if condition="$vo['url'] eq 0">原始链接</if>
     <if condition="$vo['url'] eq 1">伪静态</if>
    </td>
      <td   align="center"   class="admin_list">
    <if condition="$vo['caching'] eq 0">
    <span style="color:#999999">已关闭</span>
    <else />
    <em>{$vo['caching']}</em> 分
    </if>
    </td>
      <td   align="center"  class="admin_list" >
    <a href="{:U('edit',array('id'=>$vo['id']))}">修改</a><if condition="$vo['systemclass'] neq 1">&nbsp;&nbsp;<a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('你确定要删除吗？')">删除</a> </if>
    </td>
    </tr>
  </volist>
    </table> 
    <table width="100%" border="0" cellspacing="10" cellpadding="0" class="admin_list_btm">
      <tr>
        <td>
<input name="add" type="button" class="admin_submit" id="add" value="添加页面"  onclick="window.location='{:U('add')}'"/>
<input type="button" name="open" value="设置链接" class="admin_submit"  id="SetUrl"/>
<input type="button" name="open1" value="设置缓存" class="admin_submit"  id="SetCaching"/>
<input type="button" name="ButDel" id="ButDel" value="删除页面" class="admin_submit"   />
    </td>
        <td width="305" align="right">
    
      </td>
      </tr>
  </table>
  <span id="OpUrl"></span>
  <span id="OpCaching"></span>
   </form>
<div class="qspage">{$page}</div>
</div>
  <!--弹出层的内容-->
<div id="UrlHtml" style="display: none" >
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="6" >
    <tr>
      <td width="20" height="30">&nbsp;</td>
      <td height="30"><strong  style="color:#0066CC; font-size:14px;">将所选页面链接设置为：</strong></td>
    </tr>
        <tr>
      <td height="25">&nbsp;</td>
      <td>
    <label >
                      <input name="url" type="radio" value="0" checked="checked"  />
                      原始链接 </label>   </td>
    </tr>
    <tr>
      <td height="25">&nbsp;</td>
      <td><label >
                      <input type="radio" name="url" value="1"  />
                      伪静态</label></td>
    </tr>

    <tr>
      <td height="25">&nbsp;</td>
      <td><input type="submit" name="set_url" id="set_url" value="确定" class="admin_submit"    /></td>
      </tr>
  </table>
</div>
<!--弹出层的内容结束--> 
<div id="CachingHtml" style="display: none" >
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="6" >
    <tr>
      <td height="30">&nbsp;</td>
      <td height="30"><strong  style="color:#0066CC; font-size:14px;">将所选页面缓存设置为：</strong></td>
    </tr>
        <tr>
      <td width="20" height="25">&nbsp;</td>
      <td>
   <input name="caching" type="text"  class="input_text_200" id="caching" value="0" maxlength="30"/>

            分钟 <br /><br />

      <span style="color:#666666">(0为不缓存,建议设为180 以上) </span></td>
    </tr>
 
        <tr>
          <td height="25">&nbsp;</td>
          <td><input type="button" name="set_caching" id="set_caching" value="确定" class="admin_submit"></td>
    </tr>
  </table>
</div>
<!--弹出层的内容结束-->
<include file="public:footer" />
<script type="text/javascript">
$(document).ready(function()
{
  $("#SetUrl").QSdialog({
  DialogAddObj:"#OpUrl",
  DialogTitle:"请选择",
  DialogContent:"#UrlHtml",
  DialogContentType:"id"
  });
  $("#SetCaching").QSdialog({
  DialogAddObj:"#OpCaching",
  DialogTitle:"请选择",
  DialogContent:"#CachingHtml",
  DialogContentType:"id" 
  }); 
  //点击批量删除  
  $("#ButDel").click(function(){
    if (confirm('你确定要删除吗？'))
    {
      $("form[name=form1]").attr("action","{:U('delete')}");
      $("form[name=form1]").submit()
    }
  });
  $("#set_caching").live('click',function(){
      $("form[name=form1]").attr("action","{:U('set_caching')}");
      $("form[name=form1]").submit()
  });
    
});
</script>
</body>
</html>